3.1.5 \(\int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx\) [5]

3.1.5.1 Optimal result
3.1.5.2 Mathematica [A] (verified)
3.1.5.3 Rubi [A] (verified)
3.1.5.4 Maple [C] (verified)
3.1.5.5 Fricas [C] (verification not implemented)
3.1.5.6 Sympy [F]
3.1.5.7 Maxima [F]
3.1.5.8 Giac [F]
3.1.5.9 Mupad [F(-1)]

3.1.5.1 Optimal result

Integrand size = 23, antiderivative size = 116 \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{3 b^2 d}+\frac {2 A \sin (c+d x)}{3 b d \sqrt {b \sec (c+d x)}} \]

output
2/3*A*sin(d*x+c)/b/d/(b*sec(d*x+c))^(1/2)+2*B*(cos(1/2*d*x+1/2*c)^2)^(1/2) 
/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/b/d/cos(d*x+c)^( 
1/2)/(b*sec(d*x+c))^(1/2)+2/3*A*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1 
/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))*cos(d*x+c)^(1/2)*(b*sec(d*x+c) 
)^(1/2)/b^2/d
 
3.1.5.2 Mathematica [A] (verified)

Time = 0.40 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.74 \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\frac {\sec ^2(c+d x) \left (6 B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+A \left (2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\sin (2 (c+d x))\right )\right )}{3 d (b \sec (c+d x))^{3/2}} \]

input
Integrate[(A + B*Sec[c + d*x])/(b*Sec[c + d*x])^(3/2),x]
 
output
(Sec[c + d*x]^2*(6*B*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2] + A*(2*S 
qrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2] + Sin[2*(c + d*x)])))/(3*d*(b* 
Sec[c + d*x])^(3/2))
 
3.1.5.3 Rubi [A] (verified)

Time = 0.52 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.01, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {3042, 4274, 3042, 4256, 3042, 4258, 3042, 3119, 3120}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {A+B \csc \left (c+d x+\frac {\pi }{2}\right )}{\left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}}dx\)

\(\Big \downarrow \) 4274

\(\displaystyle A \int \frac {1}{(b \sec (c+d x))^{3/2}}dx+\frac {B \int \frac {1}{\sqrt {b \sec (c+d x)}}dx}{b}\)

\(\Big \downarrow \) 3042

\(\displaystyle A \int \frac {1}{\left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}}dx+\frac {B \int \frac {1}{\sqrt {b \csc \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}\)

\(\Big \downarrow \) 4256

\(\displaystyle A \left (\frac {\int \sqrt {b \sec (c+d x)}dx}{3 b^2}+\frac {2 \sin (c+d x)}{3 b d \sqrt {b \sec (c+d x)}}\right )+\frac {B \int \frac {1}{\sqrt {b \csc \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}\)

\(\Big \downarrow \) 3042

\(\displaystyle A \left (\frac {\int \sqrt {b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{3 b^2}+\frac {2 \sin (c+d x)}{3 b d \sqrt {b \sec (c+d x)}}\right )+\frac {B \int \frac {1}{\sqrt {b \csc \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}\)

\(\Big \downarrow \) 4258

\(\displaystyle A \left (\frac {\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\cos (c+d x)}}dx}{3 b^2}+\frac {2 \sin (c+d x)}{3 b d \sqrt {b \sec (c+d x)}}\right )+\frac {B \int \sqrt {\cos (c+d x)}dx}{b \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle A \left (\frac {\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 b^2}+\frac {2 \sin (c+d x)}{3 b d \sqrt {b \sec (c+d x)}}\right )+\frac {B \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{b \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

\(\Big \downarrow \) 3119

\(\displaystyle A \left (\frac {\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 b^2}+\frac {2 \sin (c+d x)}{3 b d \sqrt {b \sec (c+d x)}}\right )+\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

\(\Big \downarrow \) 3120

\(\displaystyle A \left (\frac {2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{3 b^2 d}+\frac {2 \sin (c+d x)}{3 b d \sqrt {b \sec (c+d x)}}\right )+\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

input
Int[(A + B*Sec[c + d*x])/(b*Sec[c + d*x])^(3/2),x]
 
output
(2*B*EllipticE[(c + d*x)/2, 2])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[b*Sec[c + d*x 
]]) + A*((2*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[b*Sec[c + d* 
x]])/(3*b^2*d) + (2*Sin[c + d*x])/(3*b*d*Sqrt[b*Sec[c + d*x]]))
 

3.1.5.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3119
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* 
(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 3120
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 
)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 4256
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( 
b*Csc[c + d*x])^(n + 1)/(b*d*n)), x] + Simp[(n + 1)/(b^2*n)   Int[(b*Csc[c 
+ d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && IntegerQ[2* 
n]
 

rule 4258
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^n*Sin[c + d*x]^n   Int[1/Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && 
 EqQ[n^2, 1/4]
 

rule 4274
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d   In 
t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
 
3.1.5.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 12.00 (sec) , antiderivative size = 595, normalized size of antiderivative = 5.13

method result size
parts \(-\frac {2 A \left (i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sec \left (d x +c \right )-\sin \left (d x +c \right )\right )}{3 d \sqrt {b \sec \left (d x +c \right )}\, b}+\frac {2 B \left (i \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \sqrt {-\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \sqrt {\left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )-i \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \sqrt {-\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \sqrt {\left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{4} \csc \left (d x +c \right )^{4}-1}\, \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}-\sqrt {\left (1-\cos \left (d x +c \right )\right )^{4} \csc \left (d x +c \right )^{4}-1}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )}{b d \sqrt {\left (1-\cos \left (d x +c \right )\right )^{4} \csc \left (d x +c \right )^{4}-1}\, \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right ) \sqrt {-\frac {\left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1\right ) b}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}}\) \(595\)
default \(-\frac {2 \left (i A \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )+3 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )-3 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )+2 i A \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+6 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-6 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+i A \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )+3 i B \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )-3 i B \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )-A \cos \left (d x +c \right ) \sin \left (d x +c \right )-A \sin \left (d x +c \right )-3 B \sin \left (d x +c \right )\right )}{3 b d \left (\cos \left (d x +c \right )+1\right ) \sqrt {b \sec \left (d x +c \right )}}\) \(603\)

input
int((A+B*sec(d*x+c))/(b*sec(d*x+c))^(3/2),x,method=_RETURNVERBOSE)
 
output
-2/3*A/d/(b*sec(d*x+c))^(1/2)/b*(I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(c 
os(d*x+c)+1))^(1/2)*EllipticF(I*(-cot(d*x+c)+csc(d*x+c)),I)+I*(1/(cos(d*x+ 
c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*EllipticF(I*(-cot(d*x+c)+cs 
c(d*x+c)),I)*sec(d*x+c)-sin(d*x+c))+2*B/b/d*(I*((1-cos(d*x+c))^2*csc(d*x+c 
)^2+1)^(1/2)*(-(1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*(((1-cos(d*x+c))^2*c 
sc(d*x+c)^2+1)*((1-cos(d*x+c))^2*csc(d*x+c)^2-1))^(1/2)*EllipticF(I*(-cot( 
d*x+c)+csc(d*x+c)),I)-I*((1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*(-(1-cos(d 
*x+c))^2*csc(d*x+c)^2+1)^(1/2)*(((1-cos(d*x+c))^2*csc(d*x+c)^2+1)*((1-cos( 
d*x+c))^2*csc(d*x+c)^2-1))^(1/2)*EllipticE(I*(-cot(d*x+c)+csc(d*x+c)),I)+( 
(1-cos(d*x+c))^4*csc(d*x+c)^4-1)^(1/2)*(1-cos(d*x+c))^3*csc(d*x+c)^3-((1-c 
os(d*x+c))^4*csc(d*x+c)^4-1)^(1/2)*(-cot(d*x+c)+csc(d*x+c)))/((1-cos(d*x+c 
))^4*csc(d*x+c)^4-1)^(1/2)/((1-cos(d*x+c))^2*csc(d*x+c)^2-1)/(-((1-cos(d*x 
+c))^2*csc(d*x+c)^2+1)*b/((1-cos(d*x+c))^2*csc(d*x+c)^2-1))^(1/2)
 
3.1.5.5 Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.10 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.29 \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\frac {2 \, A \sqrt {\frac {b}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - i \, \sqrt {2} A \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} A \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 3 i \, \sqrt {2} B \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 i \, \sqrt {2} B \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{3 \, b^{2} d} \]

input
integrate((A+B*sec(d*x+c))/(b*sec(d*x+c))^(3/2),x, algorithm="fricas")
 
output
1/3*(2*A*sqrt(b/cos(d*x + c))*cos(d*x + c)*sin(d*x + c) - I*sqrt(2)*A*sqrt 
(b)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) + I*sqrt(2)* 
A*sqrt(b)*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) + 3*I* 
sqrt(2)*B*sqrt(b)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d* 
x + c) + I*sin(d*x + c))) - 3*I*sqrt(2)*B*sqrt(b)*weierstrassZeta(-4, 0, w 
eierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))))/(b^2*d)
 
3.1.5.6 Sympy [F]

\[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\int \frac {A + B \sec {\left (c + d x \right )}}{\left (b \sec {\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx \]

input
integrate((A+B*sec(d*x+c))/(b*sec(d*x+c))**(3/2),x)
 
output
Integral((A + B*sec(c + d*x))/(b*sec(c + d*x))**(3/2), x)
 
3.1.5.7 Maxima [F]

\[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\int { \frac {B \sec \left (d x + c\right ) + A}{\left (b \sec \left (d x + c\right )\right )^{\frac {3}{2}}} \,d x } \]

input
integrate((A+B*sec(d*x+c))/(b*sec(d*x+c))^(3/2),x, algorithm="maxima")
 
output
integrate((B*sec(d*x + c) + A)/(b*sec(d*x + c))^(3/2), x)
 
3.1.5.8 Giac [F]

\[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\int { \frac {B \sec \left (d x + c\right ) + A}{\left (b \sec \left (d x + c\right )\right )^{\frac {3}{2}}} \,d x } \]

input
integrate((A+B*sec(d*x+c))/(b*sec(d*x+c))^(3/2),x, algorithm="giac")
 
output
integrate((B*sec(d*x + c) + A)/(b*sec(d*x + c))^(3/2), x)
 
3.1.5.9 Mupad [F(-1)]

Timed out. \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]

input
int((A + B/cos(c + d*x))/(b/cos(c + d*x))^(3/2),x)
 
output
int((A + B/cos(c + d*x))/(b/cos(c + d*x))^(3/2), x)